using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

public partial class right : System.Web.UI.UserControl
{
    clsxuly xuly = new clsxuly();
    DataTable tbl = new DataTable();
    protected void Page_Load(object sender, EventArgs e)
    {
        tbl = xuly.SachMoiNhat();
        int dem = 0;
        string hinhanh;
        string tieude;
        string html = "";
        html += "<TABLE width=200 border=0>";
        html += "<TBODY>";
        html += "<TR><TD colSpan=2><IMG height=37 alt='' src='images/booktitle.gif' width=200 /></TD></TR>";
        html += "<tr>";
        foreach (DataRow dr in tbl.Rows)
        {
            
            hinhanh = dr["HINHANH"].ToString();
            tieude = dr["TENTUASACH"].ToString();
            html += "<TD width=100><IMG height=110 alt='' src='" + hinhanh + "' width=80 title='"+ tieude +"'/> </TD>";
            
            if (dem % 2 != 0)
            {
                html += "</tr>";
                html += "<tr>";
            }
            dem++; 
        }
        html += "</tr>";
        
        html += "</TBODY></TABLE>";
        

        Hienthi.InnerHtml = html;
    }
}
